package com.alm.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author ywy
 * @date 2024/6/25
 */
@Getter
@AllArgsConstructor
public enum WorkStatusEnum {

    /**
     * 工作中
     */
    WORKING(1, "工作中"),

    /**
     * 未工作
     */
    NOT_WORK(0, "未工作");


    private Integer code;

    private String value;

    public static String getByCode(Integer code) {
        for(WorkStatusEnum statusEnum : WorkStatusEnum.values()) {
            if(code.equals(statusEnum.getCode())) {
                return statusEnum.value;
            }
        }
        return "";
    }
}
